//模型创建 https://www.sequelize.com.cn/core-concepts/model-basics#%E5%AD%97%E7%AC%A6%E4%B8%B2

//乡村信息
module.exports = (sequelize, DataTypes) => {
    return sequelize.define("village",
        {
            villageId: {
                type: DataTypes.INTEGER,
                autoIncrement: true,
                primaryKey: true,
                field: 'village_id',
            },
            villageName: {
                type: DataTypes.STRING,
                notEmpty: true,
                notNull: true,
                field: 'village_name',
                comment: '乡村名称',
            }
        },
        {
            // 不要createAt、updateAt字段
            timestamps: false,
            tableName: 'village'
        }
    );
};
